def decorator(func):
    def wrapper(*args, **kwargs):
        print('开始执行')
        result = func(*args, **kwargs)
        print('执行结束')
        return result
    return wrapper
@decorator
def fun1(x):
    print( x.upper())

if __name__ == '__main__':

    fun1('bob')